package com.cn.why.film.filmindex.entity;
import javax.persistence.*;
import java.io.Serializable;

/**
 *
 * 实体类映射数据库表
 * 使用spring data jpa开发的时候，会将实体类中的成员变量与表中的字段一一对应，
 * 当我们在实体类中加上一个不与数据库表一一对应的成员变量的时候，此时我们只要在
 * 这个成员变量上加上注解@Transient
 * 商品类实体
 */
@Entity
public class Produce implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    //主键
    private Integer id;
    @Column
    private Long proNumber;
    @Column
    private String proName;
    @Column
    private double price;
    @Column
    private Long number;

    public Produce(){

    }
    public Produce(Long proNumber,String proName,double price,Long number){
        this.proNumber = proNumber;
        this.proName = proName;
        this.price = price;
        this.number = number;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getProNumber() {
        return proNumber;
    }

    public void setProNumber(Long proNumber) {
        this.proNumber = proNumber;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Long getNumber() {
        return number;
    }

    public void setNumber(Long number) {
        this.number = number;
    }
}
